<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>能不能被整除</title>
    <script>
      var num = parseInt(prompt("请输入一个整数", "30"));
      var isDivisibleByFive = num % 5;
      var isDivisibleBySix = num % 6;
      if (isDivisibleByFive === 0 && isDivisibleBySix === 0) {
        alert("这个数字同时能被5和6整除");
      } else if (isDivisibleByFive === 0) {
        alert("这个数字能被5整除，但是不能被6整除");
      } else if (isDivisibleBySix === 0) {
        alert("这个数字能被6整除，但是不能被5整除");
      } else {
        alert("这个数字既不能被5整除，也不能被6整除");
      }
    </script>
  </head>
  <body></body>
</html>
